package com.binary.markdownrecord.config.template;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

//import ${model}.EvTemplate;
//import ${package}.repository.EvTemplateRepository;

@Service
public class EvTemplateService {
    @Autowired
    private EvTemplateRepository evTemplateRepository;

    public EvTemplate save(EvTemplate obj) {
        return evTemplateRepository.save(obj);
    }

    public void delete(String id) {
        evTemplateRepository.deleteById(id);
    }

    public EvTemplate getById(String id) {
        return evTemplateRepository.getOne(id);
    }

    public List<EvTemplate> listAll() {
        return evTemplateRepository.findAll();
    }

    public Page<EvTemplate> page(Pageable pageable) {
        return evTemplateRepository.findAll(pageable);
    }
}
